import {createSlice, PayloadAction} from '@reduxjs/toolkit';


const initialState: {
    token: string,
    isLogin: boolean
} = {
    token: '',
    isLogin: false
};
const rootSlice = createSlice({
    name: 'image',
    initialState,
    reducers: {
        setValue(state, actions: PayloadAction<Partial<typeof initialState>>) {
            Object.assign(state, actions.payload);
        }
    }
});

export const {setValue} = rootSlice.actions;

export default rootSlice.reducer;
